package com.example.forjava.model.strategy;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@Service
public class Main {

    private static Map<String, Product> collect;

    public Main(List<Product> list){
        collect = list.stream().collect(Collectors.toMap(Product::type, iProduct -> iProduct));
    }

}
